home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20000217-20000824
/
000204_news@columbia.edu _Tue Apr 18 12:07:16 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2000-08-23
|
3KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id MAA23905
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 18 Apr 2000 12:07:15 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id LAA17934
for kermit.misc@watsun.cc.columbia.edu; Tue, 18 Apr 2000 11:49:08 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: Mark Sapiro <msapiro@value.net>
Subject: Re: setting executable bit on uploaded file
Date: Tue, 18 Apr 2000 08:44:46 -0700
Organization: Not Very Much
Message-ID: <38FC82EE.7C8C188C@value.net>
To: kermit.misc@columbia.edu
Russell McManus wrote:
>
> I've got a nice kermit script that does everything that I want it to
> do except one thing: the binary that it uploads does not have the
> executable bit set.
><snip>
> At this point, the files don't have the right executable bit. So I
> figured I'd just say bye to the remote kermit server, and do a couple
> of output commands like this to shell on the remote end:
>
> output chmod +x file\13
As Frank says in another reply, if you update your Kermits to C-Kermit
7.0, uploaded files will be created with the same permissions as the
source files.
If for some reason, upload is not an option, you can still fix your
script. Your problem is that the "bye" command not only exits the
remote Kermit server, it also logs you off the remote shell. If you
replace "bye" with "finish" you will be left at a shell prompt and an
output command will work. For robustness, you should check for the
prompt. e.g.
finish
input 10 {your shell prompt string or a fixed piece of it}
if fail <appropriate action>
output chmod +x ...\13
Alternatively, you can leave the remote in server mode and issue the
"chmod" command as a remote host command. i.e.
remote host chmod +x ...
> # this doesn't work: why?
> output run chmod +x rbi\13
At this point in your script you have already logged off the remote
machine with the "bye" command. If you were at a Kermit prompt on the
remote, it would work. However, given that you start Kermit with "kermit
+x", it is hard to return to a kermit prompt, since "bye" logs you off
and "finish" terminates Kermit. If you started Kermit with "kermit" and
then entered server mode with "server", "finish" would return you to a
Kermit prompt.
--
Mark Sapiro <msapiro@value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan